3.16 \(\int x^2 (a+b \sec ^{-1}(c x))^2 \, dx\)

Optimal. Leaf size=147 \[ \frac {2 i b \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )}{3 c^3}-\frac {b x^2 \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2-\frac {i b^2 \text {Li}_2\left (-i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {i b^2 \text {Li}_2\left (i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {b^2 x}{3 c^2} \]

[Out]

1/3*b^2*x/c^2+1/3*x^3*(a+b*arcsec(c*x))^2+2/3*I*b*(a+b*arcsec(c*x))*arctan(1/c/x+I*(1-1/c^2/x^2)^(1/2))/c^3-1/
3*I*b^2*polylog(2,-I*(1/c/x+I*(1-1/c^2/x^2)^(1/2)))/c^3+1/3*I*b^2*polylog(2,I*(1/c/x+I*(1-1/c^2/x^2)^(1/2)))/c
^3-1/3*b*x^2*(a+b*arcsec(c*x))*(1-1/c^2/x^2)^(1/2)/c

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 147, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {5222, 4409, 4185, 4181, 2279, 2391} \[ -\frac {i b^2 \text {PolyLog}\left (2,-i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {i b^2 \text {PolyLog}\left (2,i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}-\frac {b x^2 \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {2 i b \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )}{3 c^3}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2+\frac {b^2 x}{3 c^2} \]

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*ArcSec[c*x])^2,x]

[Out]

(b^2*x)/(3*c^2) - (b*Sqrt[1 - 1/(c^2*x^2)]*x^2*(a + b*ArcSec[c*x]))/(3*c) + (x^3*(a + b*ArcSec[c*x])^2)/3 + ((
(2*I)/3)*b*(a + b*ArcSec[c*x])*ArcTan[E^(I*ArcSec[c*x])])/c^3 - ((I/3)*b^2*PolyLog[2, (-I)*E^(I*ArcSec[c*x])])
/c^3 + ((I/3)*b^2*PolyLog[2, I*E^(I*ArcSec[c*x])])/c^3

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4181

Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E
^(I*k*Pi)*E^(I*(e + f*x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))],
 x], x] + Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e,
f}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 4185

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_)), x_Symbol] :> -Simp[(b^2*(c + d*x)*Cot[e + f*x]*
(b*Csc[e + f*x])^(n - 2))/(f*(n - 1)), x] + (Dist[(b^2*(n - 2))/(n - 1), Int[(c + d*x)*(b*Csc[e + f*x])^(n - 2
), x], x] - Simp[(b^2*d*(b*Csc[e + f*x])^(n - 2))/(f^2*(n - 1)*(n - 2)), x]) /; FreeQ[{b, c, d, e, f}, x] && G
tQ[n, 1] && NeQ[n, 2]

Rule 4409

Int[((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(n_.)*Tan[(a_.) + (b_.)*(x_)]^(p_.), x_Symbol] :> Simp[
((c + d*x)^m*Sec[a + b*x]^n)/(b*n), x] - Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Sec[a + b*x]^n, x], x] /; Fre
eQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rule 5222

Int[((a_.) + ArcSec[(c_.)*(x_)]*(b_.))^(n_)*(x_)^(m_.), x_Symbol] :> Dist[1/c^(m + 1), Subst[Int[(a + b*x)^n*S
ec[x]^(m + 1)*Tan[x], x], x, ArcSec[c*x]], x] /; FreeQ[{a, b, c}, x] && IntegerQ[n] && IntegerQ[m] && (GtQ[n,
0] || LtQ[m, -1])

Rubi steps

\begin {align*} \int x^2 \left (a+b \sec ^{-1}(c x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int (a+b x)^2 \sec ^3(x) \tan (x) \, dx,x,\sec ^{-1}(c x)\right )}{c^3}\\ &=\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2-\frac {(2 b) \operatorname {Subst}\left (\int (a+b x) \sec ^3(x) \, dx,x,\sec ^{-1}(c x)\right )}{3 c^3}\\ &=\frac {b^2 x}{3 c^2}-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2 \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2-\frac {b \operatorname {Subst}\left (\int (a+b x) \sec (x) \, dx,x,\sec ^{-1}(c x)\right )}{3 c^3}\\ &=\frac {b^2 x}{3 c^2}-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2 \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2+\frac {2 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {b^2 \operatorname {Subst}\left (\int \log \left (1-i e^{i x}\right ) \, dx,x,\sec ^{-1}(c x)\right )}{3 c^3}-\frac {b^2 \operatorname {Subst}\left (\int \log \left (1+i e^{i x}\right ) \, dx,x,\sec ^{-1}(c x)\right )}{3 c^3}\\ &=\frac {b^2 x}{3 c^2}-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2 \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2+\frac {2 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{3 c^3}-\frac {\left (i b^2\right ) \operatorname {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {\left (i b^2\right ) \operatorname {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i \sec ^{-1}(c x)}\right )}{3 c^3}\\ &=\frac {b^2 x}{3 c^2}-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2 \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2+\frac {2 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{3 c^3}-\frac {i b^2 \text {Li}_2\left (-i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {i b^2 \text {Li}_2\left (i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.27, size = 225, normalized size = 1.53 \[ \frac {1}{3} \left (a^2 x^3+\frac {a b \left (2 x^4 \sec ^{-1}(c x)-\frac {c^3 x^3+\sqrt {c^2 x^2-1} \tanh ^{-1}\left (\frac {c x}{\sqrt {c^2 x^2-1}}\right )-c x}{c^4 \sqrt {1-\frac {1}{c^2 x^2}}}\right )}{x}+\frac {b^2 \left (c^3 x^3 \sec ^{-1}(c x)^2-c^2 x^2 \sqrt {1-\frac {1}{c^2 x^2}} \sec ^{-1}(c x)-i \text {Li}_2\left (-i e^{i \sec ^{-1}(c x)}\right )+i \text {Li}_2\left (i e^{i \sec ^{-1}(c x)}\right )+c x-\sec ^{-1}(c x) \log \left (1-i e^{i \sec ^{-1}(c x)}\right )+\sec ^{-1}(c x) \log \left (1+i e^{i \sec ^{-1}(c x)}\right )\right )}{c^3}\right ) \]

Warning: Unable to verify antiderivative.

[In]

Integrate[x^2*(a + b*ArcSec[c*x])^2,x]

[Out]

(a^2*x^3 + (a*b*(2*x^4*ArcSec[c*x] - (-(c*x) + c^3*x^3 + Sqrt[-1 + c^2*x^2]*ArcTanh[(c*x)/Sqrt[-1 + c^2*x^2]])
/(c^4*Sqrt[1 - 1/(c^2*x^2)])))/x + (b^2*(c*x - c^2*Sqrt[1 - 1/(c^2*x^2)]*x^2*ArcSec[c*x] + c^3*x^3*ArcSec[c*x]
^2 - ArcSec[c*x]*Log[1 - I*E^(I*ArcSec[c*x])] + ArcSec[c*x]*Log[1 + I*E^(I*ArcSec[c*x])] - I*PolyLog[2, (-I)*E
^(I*ArcSec[c*x])] + I*PolyLog[2, I*E^(I*ArcSec[c*x])]))/c^3)/3

________________________________________________________________________________________

fricas [F]  time = 0.49, size = 0, normalized size = 0.00 \[ {\rm integral}\left (b^{2} x^{2} \operatorname {arcsec}\left (c x\right )^{2} + 2 \, a b x^{2} \operatorname {arcsec}\left (c x\right ) + a^{2} x^{2}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arcsec(c*x))^2,x, algorithm="fricas")

[Out]

integral(b^2*x^2*arcsec(c*x)^2 + 2*a*b*x^2*arcsec(c*x) + a^2*x^2, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \operatorname {arcsec}\left (c x\right ) + a\right )}^{2} x^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arcsec(c*x))^2,x, algorithm="giac")

[Out]

integrate((b*arcsec(c*x) + a)^2*x^2, x)

________________________________________________________________________________________

maple [B]  time = 0.91, size = 343, normalized size = 2.33 \[ \frac {x^{3} a^{2}}{3}+\frac {b^{2} x^{3} \mathrm {arcsec}\left (c x \right )^{2}}{3}-\frac {b^{2} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, \mathrm {arcsec}\left (c x \right ) x^{2}}{3 c}+\frac {b^{2} x}{3 c^{2}}+\frac {b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3 c^{3}}-\frac {b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3 c^{3}}-\frac {i b^{2} \dilog \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3 c^{3}}+\frac {i b^{2} \dilog \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3 c^{3}}+\frac {2 x^{3} a b \,\mathrm {arcsec}\left (c x \right )}{3}-\frac {a b \,x^{2}}{3 c \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}+\frac {a b}{3 c^{3} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}-\frac {a b \sqrt {c^{2} x^{2}-1}\, \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{3 c^{4} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arcsec(c*x))^2,x)

[Out]

1/3*x^3*a^2+1/3*b^2*x^3*arcsec(c*x)^2-1/3/c*b^2*((c^2*x^2-1)/c^2/x^2)^(1/2)*arcsec(c*x)*x^2+1/3*b^2*x/c^2+1/3/
c^3*b^2*arcsec(c*x)*ln(1+I*(1/c/x+I*(1-1/c^2/x^2)^(1/2)))-1/3/c^3*b^2*arcsec(c*x)*ln(1-I*(1/c/x+I*(1-1/c^2/x^2
)^(1/2)))-1/3*I/c^3*b^2*dilog(1+I*(1/c/x+I*(1-1/c^2/x^2)^(1/2)))+1/3*I/c^3*b^2*dilog(1-I*(1/c/x+I*(1-1/c^2/x^2
)^(1/2)))+2/3*x^3*a*b*arcsec(c*x)-1/3/c*a*b/((c^2*x^2-1)/c^2/x^2)^(1/2)*x^2+1/3/c^3*a*b/((c^2*x^2-1)/c^2/x^2)^
(1/2)-1/3/c^4*a*b*(c^2*x^2-1)^(1/2)/((c^2*x^2-1)/c^2/x^2)^(1/2)/x*ln(c*x+(c^2*x^2-1)^(1/2))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {1}{3} \, a^{2} x^{3} + \frac {1}{6} \, {\left (4 \, x^{3} \operatorname {arcsec}\left (c x\right ) - \frac {\frac {2 \, \sqrt {-\frac {1}{c^{2} x^{2}} + 1}}{c^{2} {\left (\frac {1}{c^{2} x^{2}} - 1\right )} + c^{2}} + \frac {\log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}{c^{2}} - \frac {\log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} - 1\right )}{c^{2}}}{c}\right )} a b + \frac {1}{12} \, {\left (4 \, x^{3} \arctan \left (\sqrt {c x + 1} \sqrt {c x - 1}\right )^{2} - x^{3} \log \left (c^{2} x^{2}\right )^{2} - 2 \, c^{2} {\left (\frac {2 \, {\left (c^{2} x^{3} + 3 \, x\right )}}{c^{4}} - \frac {3 \, \log \left (c x + 1\right )}{c^{5}} + \frac {3 \, \log \left (c x - 1\right )}{c^{5}}\right )} \log \relax (c)^{2} + 36 \, c^{2} \int \frac {x^{4} \log \left (c^{2} x^{2}\right )}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x} \log \relax (c) - 72 \, c^{2} \int \frac {x^{4} \log \relax (x)}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x} \log \relax (c) + 36 \, c^{2} \int \frac {x^{4} \log \left (c^{2} x^{2}\right ) \log \relax (x)}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x} - 36 \, c^{2} \int \frac {x^{4} \log \relax (x)^{2}}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x} + 12 \, c^{2} \int \frac {x^{4} \log \left (c^{2} x^{2}\right )}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x} + 6 \, {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )} \log \relax (c)^{2} - 36 \, \int \frac {x^{2} \log \left (c^{2} x^{2}\right )}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x} \log \relax (c) + 72 \, \int \frac {x^{2} \log \relax (x)}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x} \log \relax (c) - 24 \, \int \frac {\sqrt {c x + 1} \sqrt {c x - 1} x^{2} \arctan \left (\sqrt {c x + 1} \sqrt {c x - 1}\right )}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x} - 36 \, \int \frac {x^{2} \log \left (c^{2} x^{2}\right ) \log \relax (x)}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x} + 36 \, \int \frac {x^{2} \log \relax (x)^{2}}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x} - 12 \, \int \frac {x^{2} \log \left (c^{2} x^{2}\right )}{3 \, {\left (c^{2} x^{2} - 1\right )}}\,{d x}\right )} b^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arcsec(c*x))^2,x, algorithm="maxima")

[Out]

1/3*a^2*x^3 + 1/6*(4*x^3*arcsec(c*x) - (2*sqrt(-1/(c^2*x^2) + 1)/(c^2*(1/(c^2*x^2) - 1) + c^2) + log(sqrt(-1/(
c^2*x^2) + 1) + 1)/c^2 - log(sqrt(-1/(c^2*x^2) + 1) - 1)/c^2)/c)*a*b + 1/12*(4*x^3*arctan(sqrt(c*x + 1)*sqrt(c
*x - 1))^2 - x^3*log(c^2*x^2)^2 - 2*c^2*(2*(c^2*x^3 + 3*x)/c^4 - 3*log(c*x + 1)/c^5 + 3*log(c*x - 1)/c^5)*log(
c)^2 + 36*c^2*integrate(1/3*x^4*log(c^2*x^2)/(c^2*x^2 - 1), x)*log(c) - 72*c^2*integrate(1/3*x^4*log(x)/(c^2*x
^2 - 1), x)*log(c) + 36*c^2*integrate(1/3*x^4*log(c^2*x^2)*log(x)/(c^2*x^2 - 1), x) - 36*c^2*integrate(1/3*x^4
*log(x)^2/(c^2*x^2 - 1), x) + 12*c^2*integrate(1/3*x^4*log(c^2*x^2)/(c^2*x^2 - 1), x) + 6*(2*x/c^2 - log(c*x +
 1)/c^3 + log(c*x - 1)/c^3)*log(c)^2 - 36*integrate(1/3*x^2*log(c^2*x^2)/(c^2*x^2 - 1), x)*log(c) + 72*integra
te(1/3*x^2*log(x)/(c^2*x^2 - 1), x)*log(c) - 24*integrate(1/3*sqrt(c*x + 1)*sqrt(c*x - 1)*x^2*arctan(sqrt(c*x
+ 1)*sqrt(c*x - 1))/(c^2*x^2 - 1), x) - 36*integrate(1/3*x^2*log(c^2*x^2)*log(x)/(c^2*x^2 - 1), x) + 36*integr
ate(1/3*x^2*log(x)^2/(c^2*x^2 - 1), x) - 12*integrate(1/3*x^2*log(c^2*x^2)/(c^2*x^2 - 1), x))*b^2

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int x^2\,{\left (a+b\,\mathrm {acos}\left (\frac {1}{c\,x}\right )\right )}^2 \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*acos(1/(c*x)))^2,x)

[Out]

int(x^2*(a + b*acos(1/(c*x)))^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \left (a + b \operatorname {asec}{\left (c x \right )}\right )^{2}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*asec(c*x))**2,x)

[Out]

Integral(x**2*(a + b*asec(c*x))**2, x)

________________________________________________________________________________________